package com.yunshang.ysmall.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yunshang.ysmall.mapper.IndexPicInfoMapper;
import com.yunshang.ysmall.model.IndexPicInfo;
import com.yunshang.ysmall.service.IndexService;
@Service
public class IndexServiceImpl implements IndexService {
	
	@Resource
	IndexPicInfoMapper indexPicInfoMapper;

	@Override
	public List<IndexPicInfo> getIndexPicList(Map params) {
		// TODO Auto-generated method stub
		return indexPicInfoMapper.getPicListByParams(params);
	}

	@Override
	public boolean insertIndexPic(IndexPicInfo indexPicInfo) {
		// TODO Auto-generated method stub
		return indexPicInfoMapper.insert(indexPicInfo) > 0 ? true : false;
	}

	@Override
	public boolean updateIndexPic(IndexPicInfo indexPicInfo) {
		// TODO Auto-generated method stub
		return indexPicInfoMapper.update(indexPicInfo) > 0 ? true : false;
	}

	@Override
	public boolean deleteIndexPic(Integer id) {
		// TODO Auto-generated method stub
		return indexPicInfoMapper.delete(id) > 0 ? true : false;
	}

}
